package com.zdsoft.crm.controller.clue;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.zdsoft.crm.service.auth.ISysUserService;


@Controller
@RequestMapping("/charge/user/layer")
public class ChargeUserLayerController {

	@Autowired
	ISysUserService sysUserService;

	@GetMapping
	public ModelAndView list(@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
			@RequestParam(name = "pageSize", defaultValue = "5") Integer pageSize,
			@RequestParam(name = "username", defaultValue = "") String username) {
		ModelAndView mav = new ModelAndView("clue/charge/user/layer.html", "list",
				sysUserService.findPage(pageNum, pageSize, username));
		mav.addObject("username", username);
		return mav; // 省代码(视图解析器)
	}

}
